Arrays and functions
An Example
w
int add_array(int array[], int size)
w
{
w
int i;
w
int total = 0;
w
w
for (i=0; i < size; i++)
w
total += array[i];
w
w
return(total);
w
}
An example shown here is a simple function to add up all of the integers in a single dimensioned array.